<template>
  <div class="search">
    <div class="container">
      <div class="title">评价</div>
      <div class="appraise">
        <div class="left">
          <div class="img" />
          <div class="list">
            <div class="list-title">钢管</div>
            <div>
              <span class="list-title">标 号：</span>外20内6.03
            </div>
            <div>
              <span class="list-title">标 号：</span>外20内6.03
            </div>
            <div>
              <span class="list-title">标 号：</span>外20内6.03
            </div>
            <div>
              <span class="list-title">价 格：</span>￥166.00
            </div>
          </div>
        </div>
        <div class="right">
          <div class="describe">
            <div class="describe-img" />
            <div class="star">
              <span class="star-text">描述相符</span>
              <span>
                <el-rate v-model="value1" />
              </span>
            </div>
          </div>
          <div class="text">
            <el-input v-model="textarea" type="textarea" :rows="3" placeholder="请输入内容" />
          </div>
          <div class="banner">
            <el-upload
              action="https://jsonplaceholder.typicode.com/posts/"
              list-type="picture-card"
              :on-preview="handlePictureCardPreview"
              :on-remove="handleRemove"
            >
              <i class="el-icon-plus" />
            </el-upload>
            <el-dialog :visible.sync="dialogVisible" size="tiny">
              <img width="100%" :src="dialogImageUrl" alt>
            </el-dialog>
          </div>
        </div>
      </div>
      <div class="submit-btn">
        <div class="submit-estimate">提交评价</div>
        <div> <el-checkbox v-model="checked">匿名评价</el-checkbox></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      input: '',
      num1: 1,
      dialogVisible: false,
      value1: null,
      textarea: '',
      dialogImageUrl: '',
      checked: true
      // dialogVisible: false
    }
  },
  methods: {
    handleChange(value) {
      console.log(value)
    },
    handleClose(done) {
      this.dialogVisible = false
    },
    handleRemove(file, fileList) {
      console.log(file, fileList)
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url
      this.dialogVisible = true
    }
  }
}
</script>

<style lang='scss' scoped >
.search {
  background: #f5f5f5;
  .container {
    .title {
      height: 57px;
      color: #3d3d3d;
      font-size: 16px;
      padding-left: 20px;
      line-height: 57px;
      background: #ffffff;
      font-weight: bold;
      margin: 30px 0 20px 0;
    }
    .appraise {
      background: #ffffff;
      padding: 60px 80px;
      display: flex;
      margin-bottom: 20px;
      .left {
        width: 298px;
        display: flex;
        font-size: 14px;
        .img {
          width: 82px;
          height: 83px;
          background: sandybrown;
          margin-right: 30px;
        }
        .list-title {
          color: #3d3d3d;
        }
        .list-title {
          color: #a7a7aa;
        }
      }
      .right {
        padding-left: 73px;
        border-left: 1px dotted #e5e5e5;
        .describe {
          display: flex;
          margin-bottom: 20px;
          .describe-img {
            width: 82px;
            height: 83px;
            background: sandybrown;
            margin-right: 18px;
          }
          .star {
            display: flex;
            align-items: center;
            .star-text {
              margin-right: 10px;
            }
          }
        }
        .text {
          width: 650px;
          margin-bottom: 20px;
        }
      }
    }
    .submit-btn{
        height: 77px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
        margin-bottom: 60px;
        .submit-estimate{
            width: 110px;
            height: 37px;
            background: #FF3B30;
            cursor: pointer;
            color: #ffffff;
            text-align: center;
            line-height: 37px;
            border-radius: 3px;
            margin-right: 20px;
        }
    }
  }
}
</style>
